package com.liuyjy.thread.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
 * @Author liuyjy
 * @Date 2025/2/27 15:24
 * @Description: 配置
 **/
@Data
@ConfigurationProperties(prefix = "liuyjy.common.thread-pool")
public class ThreadPoolProperties {
    /**
     * 核心线程数
     */
    private Integer corePoolSize=Runtime.getRuntime().availableProcessors()+1;
    /**
     * 最大线程数
     */
    private Integer maxPoolSize=Runtime.getRuntime().availableProcessors()*2+1;;
    /**
     * 队列容量
     */
    private Integer queueCapacity=5000;
    /**
     * 线程池维护线程所允许的空闲时间
     */
    private Integer keepAliveSeconds=800;
    /**
     * 线程池名前缀
     */
    private String threadNamePrefix="liuyjy-";


}
